{layout "../Layout/layout.latte"}
{block headTitle}效率统计{/block}
{block private_css}
    <style>
        .list-block .item-content{
            min-height:3rem;
        }
        .list-content{
            width:100%; color:#666
        }
        .box{
            width:33.33%;
            float:left;
            color:#666;
            line-height:1.5rem;
            text-align: center;
        }

    </style>
{/block}
{block tabs_content}
    {include "./eTabs.latte"}
{/block}
{block private_js}
    <script type="text/javascript">
        $(".acorn-show").click(function () {
            var buttons1 = [
                {
                    text: '昨日',
                    onClick: function () {
                        $.showPreloader('加载中...');
                        location.replace({url("mobileConsoles_taskStatistics_efficiency",array("types"=>$types,"bTypes"=>1))});
                    }
                },
                {
                    text: '7天内',
                    onClick: function () {
                        $.showPreloader('加载中...');
                        location.replace({url("mobileConsoles_taskStatistics_efficiency",array("types"=>$types,"bTypes"=>2))});
                    }
                },
                {
                    text: '30天内',
                    onClick: function () {
                        $.showPreloader('加载中...');
                        location.replace({url("mobileConsoles_taskStatistics_efficiency",array("types"=>$types,"bTypes"=>3))});
                    }
                },
                {
                    text: '所有',
                    onClick: function () {
                        $.showPreloader('加载中...');
                        location.replace({url("mobileConsoles_taskStatistics_efficiency",array("types"=>$types,"bTypes"=>4))});
                    }
                }
            ];
            var buttons2 = [
                {
                    text: '取消',
                    bg: 'danger'
                }
            ];
            var groups = [buttons1, buttons2];
            $.actions(groups);
        });

        function taskShow() {
            var id = $(this).attr('data-id');
            $(".task-show-" + id).toggle();
            $(this).find('.down-show-' + id).toggleClass('hidden');
            $(this).find('.up-show-' + id).toggleClass('hidden');
        }
    </script>
{/block}
{block content}
    <div class="list-block" style="margin-top: 56px;">
        <ul>
            <li>
                <div class="item-content">
                    <div class="item-inner acorn-show">
                        <div class="item-title" style="color: #24a0ed;">{$title}</div>
                        <div class="item-after"><span class="icon icon-down" style="color: #24a0ed;"></span></div>
                    </div>
                </div>
            </li>
        </ul>
    </div>
    <div class="list-block" style="margin-top:-1.3rem">
        {if $lists}
            {foreach $lists as $key=>$item}
                <ul class="list">
                    <li data-id="{$item['id']}">
                        <div class="list-content" style="display:block">
                            <div class="sui-ellipsis-1">
                                {if $key+1==1}
                                    <i class="icon al-icon al-icon-diyi sui-font-size-rem-1-5" style="color:red"></i>
                                {elseif $key+1==2}
                                    <i class="icon al-icon al-icon-dier sui-font-size-rem-1-5" style="color:#f60"></i>
                                {elseif $key+1==3}
                                    <i class="icon al-icon al-icon-disan sui-font-size-rem-1-5" style="color:#73f0b8"></i>
                                {elseif $key+1>=4}
                                    <span style="text-align:center;font-size: 16px;">{$key+1}</span>
                                {/if}
                                {$item['userName']?$item['userName']:$item['names']}
                            </div>
                            <div style="width:100%">
                                <div class="box">
                                    <span style="font-size:16px;color:#333">{$item['realWl']}</span>
                                    <div style="font-size:12px;">
                                        任务量(小时)
                                    </div>
                                </div>
                                <div class="box">
                                    <div style="font-size:16px;color:#333">{$item['acceptDay']}</div>
                                    <div style="font-size:12px;">
                                        耗时(小时)
                                    </div>
                                </div>
                                <div class="box">
                                    <div style="font-size:16px;color:#333"> {if $item['efficiency']>0}{$item['efficiency']}%{else}--{/if}</div>
                                    <div style="font-size:12px;">
                                        效率
                                    </div>
                                </div>
                            </div>
                        </div>
                    </li>

                </ul>
            {/foreach}
        {else}
            <div style="margin-top:50px;margin-bottom:30px;text-align:center">
                <img src="{path('[MobileConsoles]/img/null.png')}" alt="" class="" style="width:60%; height:100%; margin: 0 20%; display:block;">
                <div style="color:#999;">暂无排行</div>
            </div>
        {/if}
    </div>
{/block}